package com.chunfeng.mypen.properties;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * Redis的配置键
 *
 * @author by 春风能解释
 * <p>
 * 2023/11/17
 */
@Component
@ConfigurationProperties(prefix = "redis.config")
@Data
@NoArgsConstructor
public class RedisProperties {
    /**
     * 时间值
     */
    private Integer time;
    /**
     * 时间单位
     */
    private TimeUnit timeUnit;
    /**
     * 是否启用Redis缓存
     */
    private Boolean enable;
}
